package com.nulldev.util.web.HttpServer3.extensions.nCaptcha.backend;

import com.nulldev.util.io.file.FileUtil;
import com.nulldev.util.web.HttpServer3.Response;
import com.nulldev.util.web.HttpServer3.extensions.nCaptcha.resources.nCaptchaResource;
import com.nulldev.util.web.HttpServer3.pages.v3.HttpPage3;

public class CaptchaPage extends HttpPage3 {

	public CaptchaPage() {
		super("/captcha/legacy", true);
		super.setCachingMethod(CachingMethod.NO_CACHE);
	}

	public static final String DATA = FileUtil.getResourceAsString(nCaptchaResource.class, "captcha-legacy.html");

	@Override
	public Response onRequest(final Request request) {
		return new Response(200, createStream(DATA));
	}

}
